#include "victoryscene.h"
#include "ui_victoryscene.h"
#include "stock.h"
victoryscene::victoryscene(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::victoryscene)
{
    ui->setupUi(this);
    initeVictoryscene();
}

victoryscene::~victoryscene()
{
    delete ui;
}

void victoryscene::initeVictoryscene()
{
    setFixedSize(DEFEAT_SCENE_WIDTH,DEFEAT_SCENE_WIDTH);
    setWindowTitle("游戏胜利");
    setWindowIcon(QIcon(":/sucai/ball.PNG"));
    ui->vreplay->setStyleSheet("color:white");
    ui->vquit->setStyleSheet("color:white");
}

void victoryscene::showtime()
{
    this->show();
}

void victoryscene::paintEvent(QPaintEvent *)
{
    QPainter victory(this);
    victory.drawPixmap(0,0,DEFEAT_SCENE_WIDTH,DEFEAT_SCENE_WIDTH,QPixmap(":/sucai/VICTORY.png"));

}


void victoryscene::on_vquit_clicked()
{
    int ret = QMessageBox::question(this,"请问","确认退出游戏？");
       if(ret == QMessageBox::Yes)
               this->close();
}

void victoryscene::on_vreplay_clicked()
{
    this->close();
    emit vreplay();
}
#include "victoryscene.h"
#include "ui_victoryscene.h"
#include "stock.h"
victoryscene::victoryscene(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::victoryscene)
{
    ui->setupUi(this);
    initeVictoryscene();
}

victoryscene::~victoryscene()
{
    delete ui;
}

void victoryscene::initeVictoryscene()
{
    setFixedSize(DEFEAT_SCENE_WIDTH,DEFEAT_SCENE_WIDTH);
    setWindowTitle("游戏胜利");
    setWindowIcon(QIcon(":/sucai/ball.PNG"));
    ui->vreplay->setStyleSheet("color:white");
    ui->vquit->setStyleSheet("color:white");
}

void victoryscene::showtime()
{
    this->show();
}

void victoryscene::paintEvent(QPaintEvent *)
{
    QPainter victory(this);
    victory.drawPixmap(0,0,DEFEAT_SCENE_WIDTH,DEFEAT_SCENE_WIDTH,QPixmap(":/sucai/VICTORY.png"));

}


void victoryscene::on_vquit_clicked()
{
    int ret = QMessageBox::question(this,"请问","确认退出游戏？");
       if(ret == QMessageBox::Yes)
               this->close();
}

void victoryscene::on_vreplay_clicked()
{
    this->close();
    emit vreplay();
}
